#!/usr/bin/env python
#

from django.conf.urls.defaults import *
from socialcrm.views import *

urlpatterns = patterns('',
    (r'^(?P<path>.*)$', 'rest.service'),#demo for rest framework, will remove later
    (r'^$', 'socialcrm.views.root'),
    (r'register/$', 'socialcrm.views.register'),
    (r'(?P<company_name>[a-z]*)/(?P<view_1>[a-z_]*)/$', 'socialcrm.views.view'),
    (r'(?P<company_name>[a-z]*)/(?P<view_1>[a-z_]*)/(?P<view_2>[a-z_]*)/$', 'socialcrm.views.view'),
    (r'(?P<company_name>[a-z]*)/(?P<view_1>[a-z_]*)/(?P<view_2>[a-z_]*)/(?P<view_3>[a-z_]*)/$', 'socialcrm.views.view'),
    
    (r'(?P<company_name>[a-z]*)/(?P<view_1>[a-z_]*)/(?P<view_2>[a-z_]*)/(?P<view_3>[a-z_]*)/(?P<id>\d+)/$', 'socialcrm.views.details'),
    (r'(?P<company_name>[a-z]*)/(?P<view_1>[a-z_]*)/(?P<view_2>[a-z_]*)/(?P<id>\d+)/$', 'socialcrm.views.details'),
    (r'(?P<company_name>[a-z]*)/(?P<view_1>[a-z_]*)/(?P<id>\d+)/$', 'socialcrm.views.details'),
    
    (r'^(?P<company_name>\w+)/$', 'socialcrm.views.home'),
    (r'^test/add_contact$', 'socialcrm.test.add_contact'),
    
)
